package org.mics.enduser.request;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;


/**
 * 手机注册对象
 * @author mics
 * @date 2020年6月10日
 * @version  1.0
 */
@Data
@Schema(description = "用户注册信息")
public class RegisterRequest {
	
	@Schema(description = "账号",required = true)
    @Size(min = 4, max = 32, message = "账号必须是4-32位")
    @NotBlank(message = "账号不能为空")
    @Pattern(regexp = "(^1(3|4|5|6|7|8|9)\\d{9}$|[\\w-]+(\\.[\\w-]+)*@([\\w-]+\\.)+\\w{2,14})",message = "账号格式不正确")
    private String account;

	@Schema(description = "密码",required = true)
    @Size(min = 8, max = 32, message = "密码长度为8-32位")
    @NotBlank(message = "密码不能为空")
    private String password;

	@Schema(description = "短信校验",required = true)
    @NotNull(message = "短信校验不能为空")
    private VerificationCodeCheckRequest verificationCodeCheckRequest;
    
	@Schema(description = "昵称")
    @Size(max = 32,message = "昵称最大长度不能超过32位")
    private String nickName; 
        
	@Schema(description = "邮箱")
    @Size(max = 32,message = "邮箱最大长度不能超过32位")
    @Email(message = "邮箱格式不正确")
    private String email;
    
	@Schema(description = "设备id")
    private String deviceId;
    
	@Schema(description = "标记")
    private int flag;
    
}
